package com.lysj.admin.utils.validation.annotation;



import com.lysj.admin.utils.spring.foundation.base.BaseService;
import com.lysj.admin.utils.validation.validate.ForeignKeyValidate;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;

/**
 * @author Created by zk on 2018-12-10 20:30
 * @description 外键校验注解
 */
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = ForeignKeyValidate.class)
public @interface ForeignKey {
    String message();

    Class<?>[] groups() default {};

    Class<? extends BaseService> service();//需要调用的service
}
